package com.service.socket.process;

import org.jboss.netty.channel.Channel;

import com.service.cache.CacheManager;
import com.service.socket.protocol.CmdWord;
import com.service.socket.protocol.Packet;

public class R_Class_B1 extends R_Class_Abstract {

	public R_Class_B1(Channel channel, Packet packet) {
		super(channel, packet);
		this.vehicle = CacheManager.instance().getVehicle(packet.getDeviceNo());
	}

	@Override
	public void execute() {
		if(CmdWord.STATUS_INITIATIVE.equals(packet.status)){
			SendCommand.send(packet);
		}else{
			SendCommand.sendCtrlDtu(packet);
		}
	}
}
